/*    */ package com.zimbra.cs.mailclient.imap;
/*    */ 
/*    */ import com.zimbra.cs.mailclient.ParseException;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class AppendResult
/*    */ {
/*    */   private final long uidValidity;
/*    */   private final long[] uids;
/*    */   
/*    */   public static AppendResult parse(ImapInputStream is)
/*    */     throws IOException
/*    */   {
/* 30 */     is.skipChar(' ');
/* 31 */     long uidValidity = is.readNZNumber();
/* 32 */     is.skipChar(' ');
/* 33 */     is.skipSpaces();
/* 34 */     String uidSet = is.readText(" ]");
/*    */     try {
/* 36 */       return new AppendResult(uidValidity, uidSet);
/*    */     } catch (IllegalArgumentException e) {
/* 38 */       throw new ParseException("Invalid APPENDUID result");
/*    */     }
/*    */   }
/*    */   
/*    */   private AppendResult(long uidValidity, String uidSet) {
/* 43 */     this.uidValidity = uidValidity;
/* 44 */     this.uids = ImapUtil.parseUidSet(uidSet);
/*    */   }
/*    */   
/*    */   public long getUidValidity() {
/* 48 */     return this.uidValidity;
/*    */   }
/*    */   
/*    */   public long[] getUids() {
/* 52 */     return this.uids;
/*    */   }
/*    */   
/*    */   public long getUid() {
/* 56 */     return this.uids[0];
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/mailclient/imap/AppendResult.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */